/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to right, #e0eafc, #cfdef3);
    color: #333;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 使用 Grid 布局容器 */
.container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    height: 100vh;
}

/* 左侧区域 */
#leftSection {
    background: #ffffff;
    padding: 20px;
    border-right: 1px solid #ddd;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

/* 右侧区域 */
#rightSection {
    padding: 20px;
    box-sizing: border-box;
}

/* 标题 */
h2 {
    margin-top: 0;
    color: #007bff;
}

/* 聊天消息区域 */
#chatMessages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* 输入框和按钮 */
.chat-input {
    display: flex;
    align-items: center;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

#chatInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-right: 10px;
    font-size: 16px;
}

#sendRequestButton {
    padding: 12px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#sendRequestButton:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}


/* 卡片布局 */
#chartButtons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#chartButtons button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#chartButtons button:hover {
    background-color: #0056b3;
}

/* 表格容器 */
#tableContainer {
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background-color: #007bff;
    color: #fff;
    padding: 10px;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

#myChart {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

/* 基本样式 */
.chat-messages {
    display: flex;
    flex-direction: column;
    max-height: 400px; /* 根据需要调整 */
    overflow-y: auto;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 消息容器 */
.message {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    max-width: 60%;
}

/* 发件人消息 */
.message.sent {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
}

/* 接收消息 */
.message.received {
    align-self: flex-start;
    background-color: #e9ecef;
    color: #333;
}

/* 发件人和文本 */
.sender {
    font-weight: bold;
    margin-bottom: 5px;
}

.text {
    margin-bottom: 5px;
}

/* 时间戳 */
.message-time {
    font-size: 0.75rem;
    color: #888;
    align-self: flex-end;
}

/** 弹出表单样式 */
/* 模态框背景 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    backdrop-filter: blur(8px); /* 胶囊背景模糊效果 */
}

/* 模态框内容 */
.modal-content {
    background: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    transform: scale(0.9);
    opacity: 0;
}

/* 显示时动画 */
.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

/* 关闭按钮 */
.close {
    color: #333;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #007bff;
}

/* 表单标题 */
.modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.5em;
}

/* 表单输入框 */
input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

/* 表单按钮 */
button {
    background: linear-gradient(45deg, #007bff, #00d4ff);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: linear-gradient(45deg, #0056b3, #00aaff);
}

